package com.pengheng.config;

import com.pengheng.pojo.SimpleBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @remark
 * @Author pengheng
 * @date 2021/4/23 14:49
 */
@Configuration
@ConditionalOnClass(SimpleBean.class)
public class MyAutoConfiguration {

    static {
        System.out.println("My Auto Configuration Init.....");
    }

    @Bean
    public SimpleBean simpleBean(){
        return new SimpleBean();
    }
}
